/*
 * Copyright 2022 NXP
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef __MEL_H__
#define __MEL_H__

#include <stdint.h>


#define FRAME_LEN 512 //256
#define NUM_FBANK_BINS 64
#define NUM_MELS 64
#define SAMP_FREQ 16000
#define MEL_LOW_FREQ 20
#define MEL_HIGH_FREQ 6000

#define MIN_DB   (-80.f)
#define MAX_DB   (47.5f)

// fft source data overlap
#define HOP_LEN  256 //(128)
#define MEL_HOP_LEN  (16)

#define EPSL 0.0001f

// init fft, init window func
void init_MelSG();
// calc the melSG
void MelSG_compute_fast(int16_t* audio_data, uint32_t audio_len, uint8_t *melSG_out);
    
#endif //__MEL_H__

